import * as THREE from 'three';
import { loadGltfAndCreateInstanceMeshWithMatrixWorld } from '../three-utils';

/**
 * 加载黄色居民楼
 * @returns
 */
export const loadYellowResidentialBuilding = (): Promise<THREE.InstancedMesh | null> => {
  const matrixWorldArray = [
    [
      -0.00216918119561572, 0, 0.0012910464137276647, 0, 0, 0.005926181096583605, 0, 0,
      -0.0012910464137276647, 0, -0.00216918119561572, 0, 10.388263702392578, -0.014416411519050598,
      -0.7626221179962158, 1,
    ],
    [
      -0.001266007899621687, 0, -0.0021838905920252764, 0, 0, 0.005926181096583605, 0, 0,
      0.0021838905920252764, 0, -0.001266007899621687, 0, 6.87280797958374, -0.014416411519050598,
      4.522824287414551, 1,
    ],
    [
      -0.001266007899621687, 0, -0.0021838905920252764, 0, 0, 0.005926181096583605, 0, 0,
      0.0021838905920252764, 0, -0.001266007899621687, 0, 6.652691841125488, -0.014416411519050598,
      -5.5092339515686035, 1,
    ],
    [
      -0.00216918119561572, 0, 0.0012910464137276647, 0, 0, 0.005926181096583605, 0, 0,
      -0.0012910464137276647, 0, -0.00216918119561572, 0, 8.42706298828125, -0.014416411519050598,
      -3.8773791790008545, 1,
    ],
    [
      -0.001266007899621687, 0, -0.0021838905920252764, 0, 0, 0.005926181096583605, 0, 0,
      0.0021838905920252764, 0, -0.001266007899621687, 0, 8.827051162719727, -0.014416411519050598,
      -0.7486321926116943, 1,
    ],
    [
      -0.001266007899621687, 0, -0.0021838905920252764, 0, 0, 0.005926181096583605, 0, 0,
      0.0021838905920252764, 0, -0.001266007899621687, 0, 6.000702857971191, -0.014416411519050598,
      1.864980697631836, 1,
    ],
    [
      -0.001266007899621687, 0, -0.0021838905920252764, 0, 0, 0.005926181096583605, 0, 0,
      0.0021838905920252764, 0, -0.001266007899621687, 0, -4.080562591552734, -0.014416411519050598,
      -3.657196521759033, 1,
    ],
    [
      -0.001266007899621687, 0, -0.0021838905920252764, 0, 0, 0.005926181096583605, 0, 0,
      0.0021838905920252764, 0, -0.001266007899621687, 0, -8.920526504516602, -0.014416411519050598,
      -8.584654808044434, 1,
    ],
    [
      -0.001266007899621687, 0, -0.0021838905920252764, 0, 0, 0.005926181096583605, 0, 0,
      0.0021838905920252764, 0, -0.001266007899621687, 0, -6.961794853210449, -0.014416411519050598,
      -2.092447280883789, 1,
    ],
    [
      -0.001266007899621687, 0, -0.0021838905920252764, 0, 0, 0.005926181096583605, 0, 0,
      0.0021838905920252764, 0, -0.001266007899621687, 0, 1.2444889545440674, -0.014416411519050598,
      -1.9931175708770752, 1,
    ],
  ];
  return loadGltfAndCreateInstanceMeshWithMatrixWorld({
    modelPath: '/model/yellow-residential-building/model.glb',
    matrixWorldArray,
  });
};
